package main

import "fmt"

func add[T int | float32 | float64](a, b T) T {
	return a + b
}

type MyMap[K int | string, V string] map[K]V
type MySlice[T int | float32 | float64] []T

func main() {
	fmt.Println(add(1, 2.4))
	myMap := make(MyMap[int, string])
	mySlice := make(MySlice[float32], 0)
	for i := 0.5; i < 100; i++ {
		mySlice = append(mySlice, float32(i))
	}
	for i := 1; i < 10; i++ {
		myMap[i] = fmt.Sprintf("value%d", i)
	}
	fmt.Println(myMap)
	fmt.Println(mySlice)
}
